{extend name="common/application" /}
{block name="title"}<title>政务资讯-查看更多</title>{/block}
{block name="css"}

<link rel="stylesheet" type="text/css" href="_CSS_/government.css"/>
<!--[if lt IE 9]>
<script src="http://www.ijquery.cn/js/html5shiv.js"></script>
<![endif]-->
{/block}

{block name="navbar"}{include file="/common/navbar" /}{/block}
{block name="content"}
<!-- 主体内容 -->
<div class="main">
    <div class="mainBody normalBox clearfix">
        <div class="leftCon fl">
            <!--面包屑导航-->
            <div class="breadcrumb">
                <p>当前位置：
                    <a href="index.html">政务资讯</a> &gt;
                    <a class="curPage" href="javascript:;"></a>
                </p>
            </div>
            <!--国务院要闻-->
            <div class="importantNews sectionArea" style="margin-top: 0;">
                <div class="conBody" style="min-height: 500px;">
                    <!--<div class="sectionItem">-->
                    <!--<div class="sectionImgbox fl">-->
                    <!--<img class="sectionImg" src="_IMG_/5.png"/>-->
                    <!--</div>				-->
                    <!--<a class="sectionTitle text_overflow fl" href="javascript:;">副局长贺化率团访问欧盟知识产权局和世界知识产权局副局长贺化率团访问欧盟知识产权局和世界知识产权局</a>-->
                    <!--<p class="sectionSummary moreline fl" limit="90">日前，中国国家知识产权局副局长贺化率团对欧盟知识产权局和世界知识产权组织进行访问，全国人大文卫委员会相关负责同志随团访问。日前，中国国家知识产权局副局长贺化率团对欧盟知识产权局和世界知识产权组织进行访问，全国人大文卫委员会相关负责同志随团访问。</p>-->
                    <!--<div class="sectionTags fl">-->
                    <!--<p class="time"><span class="icons icon-time"></span>2018-01-23 11:36</p>-->
                    <!--<p class="view"><span class="icons icon-view"></span>369</p>-->
                    <!--<p class="praise"><span class="icons icon-praise"></span>231</p>-->
                    <!--<p class="collect"><span class="icons icon-collect"></span>158</p>-->
                    <!--</div>-->
                    <!--</div>-->
                </div>
                <!--分页-->
                <div id="page"></div>
                <!--<div class="pagination" id="pagination">-->
                <!--<a href="javascript:;" class="page-prev">-->
                <!--<span class="icons icon-backward"></span>-->
                <!--</a>-->
                <!--<a href="javascript:;" class="current">1</a>-->
                <!--<a href="javascript:;">2</a>-->
                <!--<a href="javascript:;">3</a>-->
                <!--<a href="javascript:;">4</a>-->
                <!--<a href="javascript:;">5</a>-->
                <!--<a href="javascript:;" class="more">...</a>-->
                <!--<a href="javascript:;">13</a>-->
                <!--<a href="javascript:;" class="page-next">-->
                <!--<span class="icons icon-forward"></span>-->
                <!--</a>-->
                <!--</div>-->
            </div>
        </div>
        <div class="rightCon fr">
            <!--政策信息-->
            <div class="policyInfo">
                <h4 class="conHeader">
                    <p class="sectionName fl">
                        <span class="icons icon-hot"></span>
                        <span>热门政务</span>
                    </p>
                    <!--<a class="readMore fr" href="javascript:;">更多<span class="icons icon-right"></span></a>-->
                </h4>
                <div class="conBody txtMarquee-top">
                    <div class="bd">
                        <ul class="infoList">
                            <li><a class="policyItem" href="javascript:;"><span class="icons icon-square"></span></a>
                            </li>
                            <li><a class="policyItem" href="javascript:;"><span class="icons icon-square"></span></a>
                            </li>
                            <li><a class="policyItem" href="javascript:;"><span class="icons icon-square"></span></a>
                            </li>
                            <li><a class="policyItem" href="javascript:;"><span class="icons icon-square"></span></a>
                            </li>
                            <li><a class="policyItem" href="javascript:;"><span class="icons icon-square"></span></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="js"}
<!-- 脚本引入 -->

<script type="text/javascript" src="_JS_/getDate.js"></script>
<script type="text/javascript" src="_JS_/slide.js"></script>
<script type="text/javascript">
    var url = window.location.href;
    type = url.split("#")[1];
    $(function () {
        newslist(1);
        hot_view();
    });
    $(".curPage").on('click', function () {
        window.location.href = "government_list.html#" + type
    });

    function newslist(page) {
        $.ajax({
            type: "get",
            url: "{:url('api/news/government_list')}",
            dataType: 'jsonp',
            jsonp: 'callback',
            data: {'sheet': "government_work", 'status': 1, "type": type, 'page': page},
            success: function (msg) {
                $(".conBody").eq(0).html("");
                if (msg.code == 200) {
                    var html = "";
                    var name = "";
                    var pages = Math.ceil(msg.data.count / 10);
                    for (var i = 0; i < msg.data.data.length; i++) {
                        var time = msg.data.data[i].time;
                        ltime = getMyDate(time * 1000);
                        var src = msg.data.data[i].pic ;
						var abstracts = cut(msg.data.data[i].abstract,130); 
                        html += '<div class="sectionItem"><div class="sectionImgbox fl"><img class="sectionImg" src="' + src + '"/></div>';
                        html += '<a class="sectionTitle text_overflow fl" href="government_details.html?id=' + msg.data.data[i].id + '">' + msg.data.data[i].title + '</a>';
                        html += '<p class="sectionSummary moreline fl" limit="90">' + abstracts + '</p>';
                        html += '<div class="sectionTags fl">';
                        html += '<p class="time"><span class="icons icon-time"></span>' + ltime + '</p>';
                        html += '<p class="view"><span class="icons icon-view"></span>' + msg.data.data[i].views + '</p>';
                        html += '<p class="praise"><span class="icons icon-praise"></span>' + msg.data.data[i].likes + '</p>';
                        html += '<p class="collect"><span class="icons icon-collect"></span>' + msg.data.data[i].collect + '</p>';
                        html += '</div></div>';
                        name = msg.data.data[i].name;
                    }
                    $(".curPage").html(name);
                    $(".conBody").eq(0).append(html);
                    $('#page').html(msg.data.render);
                    $("#pagination").delegate("a", "click", function () {
                        var num = $(this).attr("num");
                        if (num) {
                            newslist(num);
                        }
                    });
                }
                if (msg.code == 1000) {
                    layer.msg('查询失败!', {icon: 1, time: 1000});
                }
            }
        });
    }

    //热门政务
    function hot_view() {
        $.ajax({
            type: "get",
            url: "/index.php/api/news/government_list",
            data: {'number': 5, 'sheet': 'government_work', 'status': 1},
            dataType: 'jsonp',
            success: function (msg) {
                var html = "";
                //$(".infoList").html('');
                if (msg.code == 200) {
                    for (var i = 0; i < msg.data.data.length; i++) {
                        $('.policyItem').eq(i + 1).attr('href', "government_details.html?id=" + msg.data.data[i].id);
                        $('.policyItem').find("span").eq(i + 1).after(msg.data.data[i].title);
                        $('.clone').find("a").eq(i + 1).attr('href', "government_details.html?id=" + msg.data.data[i].id);
                        $('.clone').find("span").eq(i + 1).after(msg.data.data[i].title);
                    }

                }
            }
        });
    }


</script>
{/block}